<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * 岗位信息数据表
 *
 * Date: 19/03/2018
 * @author George
 */
class CreatePositionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('positions', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('company_id')->index()->comment('公司ID');
            $table->unsignedInteger('department_id')->index()->comment('部门ID');
            $table->string('name')->comment('名称');
            $table->unsignedInteger('wage')->comment('岗位时薪');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('positions');
    }
}
